package kt.smpp.pdu;

import java.sql.Timestamp;

/**
 * The MT send to customer
 * @author NQH
 *
 */
public class SMSResponse {
	public static final int MT_PUSH = 0;
	public static final int MT_RESP_VALID = 1;
	public static final int MT_RESP_VALID_MORE = 11;
	public static final int MT_RESP_INVALID = 2;
	public static final int MT_RESP_INVALID_PREFIX = 21;
	public static final int MT_RESP_INVALID_SYNTAX = 22;
	public static final int MT_RESP_INVALID_MSISDN = 23;
	public static final int MT_RESP_CONTENT_NOT_FOUND = 24;
	public static final int MT_RESP_GAME_OVER = 25;
	public static final int MT_RESP_GET_MARK = 3;
	public static final int MT_RESP_OVER_MAX_MO = 4;
	public static final int MT_RESP_OVER_MAX_MT = 5;
	public static final int CT_CLI_ICON = 3;
	public static final int CT_CUTE_TEXT = 5;
	public static final int CT_MMS_NOTIFY = 6;
	public static final int CT_OPER_LOGO = 2;
	public static final int CT_RING_TONE = 1;
	public static final int CT_TEXT = 0;
	public static final int CT_WAP_BROWSER = 7;
	public static final int CT_WAP_OMA = 9;
	public static final int CT_WAP_SI = 8;
	
	public static class DeliveryStatus {
		public static final String Waiting2Send = "WAITING";
		public static final String SUBMITTING = "SUBMITTING";
		public static final String Sent2SMSC = "SUBMITED";
		public static final String SentSuccess = "DELIVERED";
		public static final String SentFail = "FAIL";
	}
	
	private String senderNumber = "";
	private String serviceNumber = "";
	private String mobileOperator = "";
	private String commandCode = "";
	private String info = "";
	private Timestamp genDate;
	private String receiverNumber = "";
	private int contentType;
	private int messageType;
	private int requestId = 0;
	private int id = 0;
	private boolean isUnicode = false;	
	private int seqNo = 1;

	public SMSResponse clone() {
		SMSResponse newResponse = new SMSResponse();
		newResponse.setSenderNumber(getSenderNumber());
		newResponse.setReceiverNumber(getReceiverNumber());
		newResponse.setServiceNumber(getServiceNumber());
		newResponse.setMobileOperator(getMobileOperator());
		newResponse.setCommandCode(getCommandCode());
		newResponse.setInfo(getInfo());
		newResponse.setContentType(getContentType());
		newResponse.setMessageType(getMessageType());
		newResponse.setRequestId(getRequestId());
		return newResponse;
	}

	public int getContentType() {
		return this.contentType;
	}

	public void setContentType(int contentType) {
		this.contentType = contentType;
	}

	public int getMessageType() {
		return this.messageType;
	}

	public void setMessageType(int messageType) {
		this.messageType = messageType;
	}

	/**
	 * The MO 'id
	 * @param requestId
	 */
	public int getRequestId() {
		return this.requestId;
	}

	/**
	 * The MO 'id
	 * @param requestId
	 */
	public void setRequestId(int requestId) {
		this.requestId = requestId;
	}

	public String getReceiverNumber() {
		return this.receiverNumber;
	}

	public void setReceiverNumber(String receiverNumber) {
		this.receiverNumber = receiverNumber;
	}

	public String getCommandCode() {
		return this.commandCode;
	}

	public void setCommandCode(String commandCode) {
		this.commandCode = commandCode;
	}

	public Timestamp getGenDate() {
		return this.genDate;
	}

	public void setGenDate(Timestamp genDate) {
		this.genDate = genDate;
	}

	public String getInfo() {
		return this.info;
	}

	public void setInfo(String info) {
		this.info = info;
	}

	public String getMobileOperator() {
		return this.mobileOperator;
	}

	public void setMobileOperator(String mobileOperator) {
		this.mobileOperator = mobileOperator;
	}

	public String getSenderNumber() {
		return this.senderNumber;
	}

	public void setSenderNumber(String senderNumber) {
		this.senderNumber = senderNumber;
	}

	public String getServiceNumber() {
		return this.serviceNumber;
	}

	public void setServiceNumber(String serviceNumber) {
		this.serviceNumber = serviceNumber;
	}

	@Override
	public String toString() {
		return "SMSResponse [commandCode=" + commandCode + ", contentType="
				+ contentType + ", genDate=" + genDate + ", info=" + info
				+ ", messageType=" + messageType + ", mobileOperator="
				+ mobileOperator + ", receiverNumber=" + receiverNumber
				+ ", requestId=" + requestId + ", senderNumber=" + senderNumber
				+ ", serviceNumber=" + serviceNumber + "]";
	}

	public void setId(int id) {
		this.id = id;
	}

	public int getId() {
		return id;
	}

	public void setUnicode(boolean isUnicode) {
		this.isUnicode = isUnicode;
	}

	public boolean isUnicode() {
		return isUnicode;
	}

	public void setSeqNo(int seqNo) {
		this.seqNo = seqNo;
	}

	public int getSeqNo() {
		return seqNo;
	}
	
}